<script language="javascript">
alert("IN PHP");
</script>
<?php

// sent expired header to prevent browser from caching
header("Expires: Fri, 27 Jan 1984 01:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
header("Cache-Control: no-cache, must-revalidate" );
header("Pragma: no-cache" );
header("Content-Type: text/xml; charset=utf-8");




include '../../../../readcookie.php';
include '../../../../db.php';
include '../../../../forms/jsonwrapper/jsonwrapper.php';


$sql = "SELECT * FROM Article WHERE articleID = '{$_GET['varID']}'";

$rw = $db->getRow($sql);
extract($rw);

// generate JSON
$json = '{              
    "Aid": "'. $articleID .'"
            }';
echo $json;



















while ($row = mysql_fetch_array($result)) {
    //echo $row["articleTITLE"];
    $id = $row['articleID'];
    $title = $row['articleTITLE'];
    $isubtitle = $row['includeSUBTITLE'];
    $subtitle = $row['articleSUBTITLE'];
    $iheader = $row['includeHEADER'];
    $header = $row['articleHEADER'];
    $ifooter = $row['includeFOOTER'];
    $footer = $row['articleFOOTER'];
    $content = $row['articleCONTENT'];
    echo'
  <form action="plugin/base/cms/article/updatearticle.php"
   method="post" display:none>

<TABLE BORDER="0">
<TR style="visibility: hidden">
    <TD>ID:</TD>
    <td>  <INPUT TYPE="TEXT" NAME="id" SIZE="70" VALUE="',$id,'" /> </td>

  </TR>
<TR>
    <TD>Publish:</TD>
    <TD><input type="text" value="yes" name="publish" /></TD>
  </TR>
  <TR>
    <TD>Title:</TD>
    <TD>
      <INPUT TYPE="TEXT" NAME="title" SIZE="70" VALUE="',$title,'" />
    </TD>
  </TR>
  <TR>
    <TD>SubTitle:</TD>
    <TD><INPUT TYPE="TEXT" NAME="subtitle" SIZE="70"VALUE="',$subtitle,'" /></TD>
  </TR>
  <TR>
    <TD>Header:</TD>
    <TD><textarea rows="5" cols="80" name="header" wrap="physical">',$header,'</textarea> </TD>
  </TR>
    <TR>
    <TD>Content:</TD>
    <TD><textarea rows="5" cols="80" name="content" wrap="physical">',$content,'</textarea> </TD>
  </TR>
  <TR>
    <TD>Footer:</TD>
    <TD><textarea rows="5" cols="80" name="footer" wrap="physical">',$footer,'</textarea> </TD>
  </TR>

</TABLE>
<P><INPUT TYPE="SUBMIT" VALUE="Save" NAME="B1">
<INPUT TYPE="SUBMIT" VALUE="Delete" NAME="B2"></P>
</form>
    ';
}

?>
